package com.mcxx.modules.miniSalvation.family.service.read;

import com.mcxx.modules.miniSalvation.family.dao.read.AppraisalReadDao;
import com.mcxx.modules.miniSalvation.family.dto.DemocraticAppraisalDTO;
import com.yinhai.ta404.core.transaction.annotation.TaTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
@TaTransactional(readOnly = true)
public class AppraisalReadService {
    @Autowired
    private AppraisalReadDao appraisalReadDao;

    public DemocraticAppraisalDTO getAppraisalByOrderIdForNew(String orderId) {
        return appraisalReadDao.getAppraisalByOrderIdForNew(orderId);
    }

    public List<DemocraticAppraisalDTO> getAppraisalByOrderId(String orderId){
        return appraisalReadDao.getAppraisalByOrderId(orderId);
    }


    public String getAppraisalResult(String orderId) {
        return appraisalReadDao.getAppraisalResult(orderId);
    }

    public DemocraticAppraisalDTO selectAppraisalInfo(String orderId){
        return appraisalReadDao.selectAppraisalInfo(orderId);
    }


    public DemocraticAppraisalDTO getAppraisaById(String appraisalId){
        return appraisalReadDao.getAppraisaById(appraisalId);
    }

    public int selectCountByOrderId(String orderId){
        return appraisalReadDao.selectCountByOrderId(orderId);
    }
}
